home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20000217-20000824 / 000013_news@columbia.edu _Fri Feb 18 02:10:07 2000.msg < prev    next >
Internet Message Format  |  2020-01-01  |  9KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id CAA10169
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Fri, 18 Feb 2000 02:10:07 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id BAA20995
  7.     for kermit.misc@watsun.cc.columbia.edu; Fri, 18 Feb 2000 01:53:31 -0500 (EST)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: jaltman@watsun.cc.columbia.edu (Jeffrey Altman)
  10. Subject: Re: TELNET error with K95 1.19
  11. Date: 18 Feb 2000 06:53:28 GMT
  12. Organization: Columbia University
  13. Message-ID: <88iq98$kg0$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@columbia.edu
  15.  
  16. In article <3ERmaxlQV+sL@cc.usu.edu>, Joe Doupnik <jrd@cc.usu.edu> wrote:
  17. :     Yup, that's the short answer. There could have been another approach
  18. : to the difficulty which is a client offers Telnet Options but does not halt
  19. : waiting for responses. In principle, it says in bold quotes, Options can
  20. : occur at any time in the session, though the principle collides with what
  21. : to do about text exchanged in the meanwhile. Isn't that correct Jeff?
  22. : If it were correct then a regular Telnet client could offer Options and
  23. : still make progress on non-Telnet servers. I wish my UnixWare Telnet were
  24. : that way, but it isn't. This boils down to chickens, eggs, and should we
  25. : wait to check for traffic before crossing the road, or some such muddle.
  26. :     Joe D.
  27.  
  28.  
  29. The reasons that Kermit 95 and C-Kermit no longer connect without
  30. waiting for telnet option negotiations when using TELNET protocol
  31. is clearly detailed in
  32.  
  33.  http://www.kermit-project.org/telnet.html
  34.  
  35. The problem is that people are used to the behavior of the BSD telnet
  36. client which only negotiates telnet options on the port assigned to
  37. "telnet/tcp" in the /etc/services file.  If any other port is
  38. specified telnet options are not negotiated unless a '-' is used as a
  39. prefix to the port number.
  40.  
  41. This is exactly the behavior that Kermit 95 and C-Kermit have for
  42. the SET HOST command.  The SET HOST command defaults to 
  43.  
  44.   SET HOST <host> <port> /DEFAULT
  45.  
  46. The TELNET command is a shortcut for 
  47.  
  48.   SET HOST /CONNECT <host> <port> /TELNET
  49.  
  50. In other words, it means use TELNET protocol.  The /DEFAULT protocol
  51. switch in SET HOST instructs Kermit to try to determine the protocol
  52. to use based upon the port number.
  53.  
  54.    23 telnet
  55.   513 rlogin
  56.  1649 telnet
  57.   443 ssl
  58.   151 telnet after ssl is negotiated
  59.   992 telnet after ssl is negotiated
  60.   543 klogin
  61.  2105 eklogin
  62.    80 no protocol (http)
  63.    
  64. anything else is treated as an NVT without telnet negotiations.
  65.  
  66. It is extremely important for Kermit to wait for negotiations to 
  67. complete when using telnet protocol:
  68.  
  69.  . When performing authentication and encryption it is not safe
  70.    to send any data until after the authentication and encryption
  71.    is successful.  Even sending other telnet negotiations can be
  72.    a security hole.  Therefore, this must be done up front.
  73.  
  74.  . Our experience has shown that many telnetd implementations do
  75.    not wait for the terminal type negotiation to be completed 
  76.    before starting the 'login' process.  This has several negative
  77.    side effects:
  78.  
  79.    - as the terminal type continues to change the screen dimensions
  80.      and other characteristics of the terminal might force the login
  81.      prompt off the screen
  82.  
  83.    - the login process and its subprocesses will configure the 
  84.      environment with a different terminal type than the one
  85.      negotiated between the client and server.
  86.  
  87.  . Waiting for the responses to negotiation requests allows Kermit to
  88.    enforce policies based upon the state of the connection.
  89.  
  90.  . If Kermit does not wait for negotiation responses there is 
  91.    a timing problem when Kermit does not enter CONNECT mode 
  92.    immediately.  This is most prevalent when writing scripts
  93.    with the INPUT command.  The first several INPUT commands
  94.    in a Kermit script being executed on a Telnet session become
  95.    very unpredictable.  This is because the initial data flow
  96.    is entirely telnet negotiations which require several round
  97.    trip times to complete.  This can vary from several hundred
  98.    milliseconds to tens of seconds depending on the connection.
  99.    These timing issues should be transparent to the script.
  100.  
  101. When a telnet state machine is implemented as per RFCs 854, 855, and
  102. 1143 there are no problems with being agressive about negotiating
  103. telnet options.  The problems occurs when the server does not correctly
  104. implement the telnet state machine.
  105.  
  106. For instance, the BSD FTP server (ftpd) is a proper Telnet NVT as per
  107. RFC 854.  It doesn't support any Telnet Options at all.  But it
  108. processes all Telnet Commands with appropriate responses such as
  109. rejecting all attempts to activate a telnet option by send DONT and 
  110. WONT commands as appropriate.
  111.  
  112. The real telnet servers for which this is a problem include:
  113.  
  114.   . AOS/VS II
  115.   . IBM OS/2 Warp 4.0
  116.   . Several third party Windows Telnet servers
  117.   . Meridian's Telnet to LAT gateway for NT
  118.   . One release of Compaq Tru64 Telnetd which has been fixed by
  119.     a patch
  120.  
  121. The most common problem is a Telnet Server that does not respond
  122. to options that it was not specificly programmed to handle.  But
  123. some of the servers such as IBM OS/2 Warp 4.0 and Meridian's gateway
  124. product respond to various WILL commands with DO but then never
  125. negotiate the option.  
  126.  
  127. The OS/2 case is interesting because the server responds DO AUTH
  128. since it does support the AUTH option but since there are no 
  129. authentication DLLs installed (the OS/2 TCP/IP 1.2 product had
  130. Kerberos 4 in it) it thinks it has nothing to do.
  131.  
  132. The Meridian case appears to be a privately implemented telnet option
  133. which conflicts with an IANA assigned option number.
  134.  
  135. Since I am now on a roll talking about Telnet bugs.  Almost every
  136. telnetd distributed based upon the BSD Telnet code contains an off
  137. by one error which will result in the loss of the last byte of data
  138. being lost if the read from network data buffer is filled.  This is
  139. true of every Linux telnetd, the GNU Telnetd, the SRP telnetd,
  140. the Kerberos telnetd, the Next, and BeOS telnetds.  This bug will
  141. be fixed in the next Kerberos 5 telnetd and is currently fixed
  142. in the START_TLS telnetd supported by Peter Runestig.
  143.  
  144. But back to the original point of this thread.  The question is 
  145. what is the definition of the 'TELNET' command in Kermit 95 and 
  146. C-Kermit.  Does it mean:
  147.   
  148.  . make a connection to the host and guess what protocol should
  149.    be used (if any), or
  150.  
  151.  . make a connection to the host and use Telnet protocol.
  152.  
  153. Since Kermit 95 and C-Kermit have other commands such as 
  154.  
  155.   RLOGIN <host> 
  156.  
  157. to make a connection using LOGIN protocol it makes sense that the
  158. TELNET command would make connections using TELNET protocol.
  159.  
  160. This is pure and simple a design choice by me.  It changes the
  161. behavior from previous versions of C-Kermit and Kermit 95 when the
  162. TELNET command is used instead of SET HOST.  The old behavior was a
  163. side effect of the fact that TELNET was the only protocol Kermit
  164. supported on TCP/IP was for a very long time.  When it became obvious
  165. in release 5A(190) that we needed a method to provide for TCP/IP
  166. connections without any higher level protocols in order to support
  167. things such as 'modemd' on Linux, the method used to handle this was
  168. an unsupportable hack.
  169.  
  170. C-Kermit 7.0 and Kermit 95 1.1.19 incorporates a completely new design
  171. for protocol handling that is general purpose.  Kermit now easily
  172. handles TELNET, RLOGIN, KLOGIN, EKLOGIN, SSL, TLS, HTTP, RAW TCP/IP
  173. sockets, and it is ready for FTP, SSH and any other protocols we
  174. decide to add at a later date.  The Telnet state machine is completely
  175. modular and supports both client and server side negotiations in a
  176. single code base.  The only things the new Telnet code does not do
  177. that I wish it did are:
  178.  
  179.  . Telnet Linemode
  180.  . Telnet Speed
  181.  . Telnet Remote Flow Control
  182.  . Telnet 3270
  183.  . Telnet Extended 3270 
  184.  . Telnet 5250
  185.  . Telnet Remote Com Port Control (set speed, parity, flow control
  186.    of remote serial port devices such as found on reverse terminal
  187.    servers)
  188.  . Send Go Aheads when Suppress Go Aheads has not been negotiated
  189.    (this is the one violation of the Telnet protocol that I am 
  190.    aware of in C-Kermit 7.0 and Kermit 95 1.1.19)
  191.  
  192. I will get to implementing all of this as the need arises.
  193.  
  194.     Jeffrey Altman * Sr.Software Designer * Kermit-95 for Win32 and OS/2
  195.                  The Kermit Project * Columbia University
  196.               612 West 115th St #716 * New York, NY * 10025
  197.   http://www.kermit-project.org/k95.html * kermit-support@kermit-project.org